RAIS  3.2
RAIS::ApplicationLogicLayer::Localisation Class Reference

This class implements A.L.L. methods for localisation. More...

List of all members.

Static Public Member Functions

static string Translate (string textToTranslate, string translationContext, string sourceLanguage, string targetLanguage)
 This method performs translation of a supplied text from source language into the specified language.
static bool AddCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method adds a new culture through DAL.
static bool SaveCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method saves a culture through DAL.
static bool DeleteCulture (RAIS.Common.Localization.Culture culture, ref string returnMessage)
 This method deletes a culture through DAL.
static TranslationItems GetAllTranslations (RAIS.Common.Localization.Culture sourceLanguage, RAIS.Common.Localization.Culture targetLanguage, bool untranslatedOnly, string sortExpression, string sortDirection)
 This method retrieves a list of all translation items from DAL.
static TranslationItems GetTranslationsByContext (RAIS.Common.Localization.Context context, RAIS.Common.Localization.Culture sourceLanguage, RAIS.Common.Localization.Culture targetLanguage, bool untranslatedOnly, string sortExpression, string sortDirection)
 This method retrieves a list of translation items with the specified context from DAL.
static bool SaveTranslations (TranslationItems translations, ref string returnMessage)
 This method saves a modified translations through DAL.

Properties

static Cultures SupportedLanguages [get]
 A list of supported languages (read-only property).
static Contexts Contexts [get]
 This property retrieves a list of Contexts (read-only property).

Detailed Description

This class implements A.L.L. methods for localisation.


Member Function Documentation

static bool RAIS::ApplicationLogicLayer::Localisation::AddCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method adds a new culture through DAL.

Parameters:
cultureNew culture object.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 115 of file Localisation.cs.

static bool RAIS::ApplicationLogicLayer::Localisation::DeleteCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method deletes a culture through DAL.

Parameters:
cultureCulture object to be delted.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 138 of file Localisation.cs.

static TranslationItems RAIS::ApplicationLogicLayer::Localisation::GetAllTranslations ( RAIS.Common.Localization.Culture  sourceLanguage,
RAIS.Common.Localization.Culture  targetLanguage,
bool  untranslatedOnly,
string  sortExpression,
string  sortDirection 
) [static]

This method retrieves a list of all translation items from DAL.

Returns:
Dictionary of translation item names vs TranslationItem objects

Definition at line 147 of file Localisation.cs.

static TranslationItems RAIS::ApplicationLogicLayer::Localisation::GetTranslationsByContext ( RAIS.Common.Localization.Context  context,
RAIS.Common.Localization.Culture  sourceLanguage,
RAIS.Common.Localization.Culture  targetLanguage,
bool  untranslatedOnly,
string  sortExpression,
string  sortDirection 
) [static]

This method retrieves a list of translation items with the specified context from DAL.

Returns:
Dictionary of translation item names vs TranslationItem objects

Definition at line 160 of file Localisation.cs.

static bool RAIS::ApplicationLogicLayer::Localisation::SaveCulture ( RAIS.Common.Localization.Culture  culture,
ref string  returnMessage 
) [static]

This method saves a culture through DAL.

Parameters:
cultureCulture object.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 127 of file Localisation.cs.

static bool RAIS::ApplicationLogicLayer::Localisation::SaveTranslations ( TranslationItems  translations,
ref string  returnMessage 
) [static]

This method saves a modified translations through DAL.

Parameters:
translations- dictionary of TranslationItem objects.
returnMessageMessage string about the action result.
Returns:
true on success, otherwise false;

Definition at line 176 of file Localisation.cs.

static string RAIS::ApplicationLogicLayer::Localisation::Translate ( string  textToTranslate,
string  translationContext,
string  sourceLanguage,
string  targetLanguage 
) [static]

This method performs translation of a supplied text from source language into the specified language.

Parameters:
textToTranslateText in source language to be translated
sourceLanguageSource language
translationContextTranslation context (e.g. page name, message group, etc)
targetLanguageTarget language
Returns:
Translated text or the original text with a translatin failure indication
Note:
The methods queries DB through DAL for translation of the specified text. If the text is not found in the translation table, original text is retuned with a prefinx "(UNTR <LANG>)", where <LANG> stands for the target language.

For example, if translation the text "This is to be translated" to French is not found, the returned text will be looking like "(UNTR French)This is to be translated"

Definition at line 93 of file Localisation.cs.


Property Documentation

Contexts RAIS::ApplicationLogicLayer::Localisation::Contexts [static, get]

This property retrieves a list of Contexts (read-only property).

Returns:
Dictionary of context names vs context objects
Warning:
Addressing this property casues an MS SQL query. Use is for initialising a local variable instead of addressing it iteratively.

Definition at line 69 of file Localisation.cs.

Cultures RAIS::ApplicationLogicLayer::Localisation::SupportedLanguages [static, get]

A list of supported languages (read-only property).

Returns:
Array of strings, containing supported languages
Warning:
Addressing this property casues an MS SQL query. Use is for initialising a local variable instead of addressing it iteratively.

Definition at line 55 of file Localisation.cs.


The documentation for this class was generated from the following file: